/*
 * GaseousPhase.cpp
 *
 *  Created on: 28 May 2011
 *      Author: allan
 */

#include "GaseousPhase.h"

GaseousPhase::GaseousPhase() 
{}

GaseousPhase::~GaseousPhase() 
{}

const vector<double> GaseousPhase::FugacityCoefficients(double T, double P) const
{
	vector<double> fugacityCoeffs(GetNumOfSpecies(), 1.0);
	
	return fugacityCoeffs;
}
	
const vector<double> GaseousPhase::Fugacities(double T, double P) const
{
	vector<double> fugacities(FugacityCoefficients(T, P));
	
	for(unsigned iSpecies = 0; iSpecies < GetNumOfSpecies(); ++iSpecies)
		fugacities[iSpecies] *= P;
	
	return fugacities;
}

const vector<double> GaseousPhase::Activities(double T, double P) const
{
	vector<double> activities(FugacityCoefficients(T, P));
	
	for(unsigned iSpecies = 0; iSpecies < GetNumOfSpecies(); ++iSpecies)
		activities[iSpecies] *= P * GetMolarFractionOfSpecies(iSpecies);
	
	return activities;
}
